
import request from '@/utils/request'
// 查询问卷列表
export function listSurveyApi(query) {
    return request({
        url: '/feedback/survey/list',
        method: 'get',
        params: {
            orderByColumn:'surId',
            isAsc:'descending',
            ...query
        }
    })
}
// 查询问卷详细
export function getSurveyApi(surId) {
    return request({
        url: '/feedback/survey/' + surId,
        method: 'get'
    })
}

// 克隆问卷
export function cloneSurveyApi(surId) {
    return request({
        url: '/feedback/survey/clone/' + surId,
        method: 'get'
    })
}

// 新增问卷
export function addSurveyApi(data) {
    return request({
        url: '/feedback/survey',
        method: 'post',
        data: data
    })
}

// 修改问卷
export function updateSurveyApi(data) {
    return request({
        url: '/feedback/survey',
        method: 'put',
        data: data
    })
}

// 删除问卷
export function delSurveyApi(surId) {
    return request({
        url: '/feedback/survey/' + surId,
        method: 'delete'
    })
}


// 查找问卷题目信息
export function findSurveyIssueApi(surId) {
    return request({
        url: '/feedback/surveyIssue/findOne' ,
        method: 'get',
        params:{ id:surId }
    })
}


// 保存问卷题目信息
export function saveSurveyIssueApi(data) {
    return request({
        url: '/feedback/surveyIssue/save' ,
        method: 'post',
        data
    })
}
